import React from 'react'
import { useRoutes } from 'react-router-dom'
import Redirect from './Redirect'
import Video from '../view/Video/Video'
import Camera from '../view/Camera/Camera'

export default function UseRoute() {
  const ele = useRoutes([
    {
      path: '/',
      element: <Redirect to="/video" />
    },
    {
      path: '/video',
      element: <Video />
    },
    {
      path: '/camera',
      element: <Camera />
    }
  ])
  return ele
}
